<template>
    <div>
        <el-button type="default" @click="() => {
            dialogCom?.handleClose()
        }">取消</el-button>
        <el-button type="primary" @click="() => {
            modifyCom?.submitByDialog()
        }">暂时存储</el-button>
        <el-button type="primary" @click="() => {
            triggersaveandfinish()
        }">保存</el-button>
    </div>
</template>
<script>
export default {
    data() {
        return {
            dialogCom: undefined,
            modifyCom: undefined
        }
    },
    methods: {

        async triggersaveandfinish() {
            var result = await this.modifyCom.submitByDialog()
            if (result?.success) {
                this.dialogCom?.handleClose();
            }

        },
        initByDialog(_data) {
            this.dialogCom = _data?.dialogCom;
            this.modifyCom = _data?.modifyCom;

        }
    }
}</script>